package org.example.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.util.Date;

/**
 * CREATE TABLE IF NOT EXISTS  SPRING_AI_CHAT_MEMORY (
 *     conversation_id VARCHAR(36) NOT NULL,
 *     content LONGVARCHAR NOT NULL,
 *     type VARCHAR(10) NOT NULL,
 *     "timestamp" TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL
 * );
 */
@Data
@TableName("SPRING_AI_CHAT_MEMORY")
public class ChatHistory {

    @TableField("conversation_id")
    String conversationId;

    String content;

    @TableField("`type`")
    String type;

    @TableField("\"timestamp\"")
    Date timestamp;
}
